from loguru import logger
import os, time
def setup_logging():
    log_dir = os.path.join(os.getcwd(), "logs")
    os.makedirs(log_dir, exist_ok=True)
    path = os.path.join(log_dir, f"{time.strftime('%Y-%m-%d')}.log")
    # logger.remove()
    logger.add(path, rotation="50 MB", enqueue=True, compression="zip", encoding="utf-8")
    logger.info("日志初始化")
